#include <iostream>
using namespace std;

class Goods {
public:
    int Amount;
    float Price;
    float MFG;
    double total();
    void G_Amount(int v1);
    void G_Price(double v2);
};
double Goods::total() {
    return Amount*Price;
}
void Goods::G_Amount(int v1) {
    Amount=v1;
}
void Goods::G_Price(double v2) {
    Price=v2;
}
class Student {
public:
    int id;
    int age;
    float score;
    void say(){
        cout << "Student id: " << id << " age is: "<< age << " score is: "<< score << endl;
    };
};

class Date {
	public:
		Date();
		void set_date();
		void read_date();
	private:
		int year;
		int month;
		int day;
};
Date::Date(){
	year = 0;
	month = 0;
	day = 0;
}
void Date::set_date(){
	cin>>year;
	cin>>month;
	cin>>day;
}
void Date::read_date(){
	cout<<year<<"-"<<month<<"-"<<day<<endl;
}

class Box {
public:
    //char color[20];
    double length;
    double width;
    double height;
    double getVolum()
    {
        return length*width*height;
    };
};

int main() {
	cout<<"------------welcome---------"<<endl;
	
    Goods Good1;
    Goods Good2 = { 3, 10 };

    double Total_Price = 0;
    Good1.Amount = 6;
    Good1.Price = 12;
    Total_Price = Good1.Amount * Good1.Price;
    cout<<"goods1 total is: "<< Total_Price << " yuan" << endl;
    Total_Price = Good2.Amount * Good2.Price;
    cout<<"goods2 total is: "<< Total_Price << " yuan" << endl;
    cout << "goods1 _total is: "<< Good1.total() << endl;
    
    Goods Good3;
    Good3.G_Amount(5);
    Good3.G_Price(9);
    cout << "goods3 total is: "<< Good3.total() << endl;
    
    Student stu1;
    Student *pStu=&stu1;
    pStu->id=1001;
    pStu->age=15;
    pStu->score=68.1;
    pStu->say();
    
    Box b1= {12,5,6};
    cout << "the Box volum is: "<< b1.getVolum() << endl;
    Box b2[2] = {{5,6,4},{2,9,7}};
    for(int i=0; i<2; i++) {
        cout<<"b2-"<<i<<" volum is: "<<b2[i].getVolum()<<endl;
    }
	Date d1, d2;
	d1.set_date();
	d1.read_date();
	d2.read_date();
    return 0;
}
